#include "dialog.h"
#include "ui_dialog.h"

Dialog::Dialog(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::Dialog)
{
    ui->setupUi(this);
}

Dialog::~Dialog()
{
    delete ui;
}


void Dialog::on_toolButton_clicked()
{
    QWDialogSize *dlgTableSize=new QWDialogSize(this);
    Qt::WindowFlags flags=dlgTableSize->windowFlags();
    dlgTableSize->setWindowFlags(flags | Qt::MSWindowsFixedSizeDialogHint);
    dlgTableSize->setRowColumn(dlgTableSize->rowCount(),dlgTableSize->columnCount());

    int ret=dlgTableSize->exec();

    if(ret==QDialog::Accepted){
        ui->warn->setText("ok:" + static_cast<QString>(dlgTableSize->rowCount()));
        QString row_ = static_cast<QString>(dlgTableSize->rowCount());
        ui->lerow->setText(row_);
        ui->lecol->setText(static_cast<QString>(dlgTableSize->columnCount()));
        // ...
    } else{
        ui->warn->setText("cancel");
    }
    delete  dlgTableSize;
}
